package com.eascs.web.o2o.scheduler.quartz;

import javax.inject.Inject;

import org.springframework.stereotype.Component;

import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.web.o2o.quartz.util.BaseJobUtil;
import com.eascs.web.o2o.quartz.util.ExecutorService;
import com.eascs.web.o2o.scheduler.service.OaSynchroService;

/**
 * OA同步任务--数据中心、业务系统、工作流系统
 *
 */
@Component("OaSynchroQuartz")
public class OaSynchroQuartz extends BaseJobUtil {
	
	protected final Logger logger = LoggerFactory.getLogger(getClass());

	@Inject
	private OaSynchroService oaSynchroService;
	
	public void synchroHrEmployeeAuditor(){
		executor("OaSynchroQuartz", "synchroHrEmployeeAuditor", "同步员工审核人表", new ExecutorService() {
			@Override
			public void exe() {
				oaSynchroService.synchroEmployeeAuditor();
			}
		});
	}
	
	public void synchroHrOrgan(){
		executor("OaSynchroQuartz", "synchroHrOrgan", "同步组织部门", new ExecutorService() {
			@Override
			public void exe() {
				oaSynchroService.sycnHrOrgan();
			}
		});
	}
}
